package com.itheima.service.impl;

import com.itheima.dao.ProdectDao;
import com.itheima.pojo.Prodect;
import com.itheima.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("productService")
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProdectDao prodectDao;

    public List<Prodect> getAll() {
       return prodectDao.findAll();
    }

    public void addProduct() {
        prodectDao.addProduct();
    }

    public void deleteProduct() {
        prodectDao.deleteProduct();
    }

    public void updateProduct() {
        prodectDao.updataProduct();
    }
}
